home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 July / CHIP 2006-07.2.iso / program / google / google-toolbar-win.xpi / amulet-jslib / reporter.js < prev    next >
Encoding:
Text File  |  2006-05-15  |  519 b   |  15 lines

  1. function PROT_Reporter() {
  2. this.debugZone = "reporter";
  3. this.reportURL = PROT_globalStore.getActionReportURL();
  4. this.prefs_ = new G_Preferences();
  5. }
  6. PROT_Reporter.prototype.report = function(subject, data) {
  7. if (!this.prefs_.getPref(PROT_globalStore.getSendUserReportsPrefName(),
  8. false))
  9. return;
  10. var url = this.reportURL + "evts=" + encodeURIComponent(subject) +
  11. "&evtd=" + encodeURIComponent(data);
  12. G_Debug(this, "Sending report: " + url);
  13. (new PROT_XMLFetcher(true /* strip cookies */)).get(url, null /* no cb */);
  14. }
  15.